/* 
 * Modbus mutex for RTU.
 * Copyright (c) 2012  apleilx
 * All rights reserved.
 * no limite
 */

/* ----------------------- Platform includes --------------------------------*/

//#include "osObjects.h"                                        
#include "mbdef.h"  

#if MB_OS_USED > 0

//static OS_MUTEX      MutexObjmbCmd;
//static uint8_t       mbMutexCreated = 0;
/*****************************************************************************//*!
*
* @brief   modbus sync mutex creat.
*     
* @param   none
*
* @return  none
*
* @ Pass/ Fail criteria: none
*****************************************************************************/
void mbOsSyncMutexCreat(void){
//	OS_ERR      os_err;
//    
//    if(!mbMutexCreated)
//        OSMutexCreate (&MutexObjmbCmd, "MUTEX_MB", &os_err);
//    
//    mbMutexCreated = 1;
}

/*****************************************************************************//*!
*
* @brief   modbus sync mutex pend.
*     
* @param   none
*
* @return  none
*
* @ Pass/ Fail criteria: none
*****************************************************************************/
void mbOsSyncMutexPend(void){
//    OS_ERR      os_err;
//    CPU_TS      cpu_ts;
//    OSMutexPend (&MutexObjmbCmd, 0,  OS_OPT_PEND_BLOCKING, &cpu_ts, &os_err);
}

/*****************************************************************************//*!
*
* @brief   modbus sync mutex post.
*     
* @param   none
*
* @return  none
*
* @ Pass/ Fail criteria: none
*****************************************************************************/
void mbOsSyncMutexPost(void){
//    OS_ERR      os_err;
//
//    OSMutexPost (&MutexObjmbCmd,  OS_OPT_POST_NO_SCHED, &os_err);
}

#endif
